Array analysis for Valerie Schumacher (Valerie.Schumacher@childrens.harvard.edu), Schumacher group at HMS.

Contact John Hutchinson (jhutchin@hsph.harvard.edu) for additional details.

The most recent update of this html document occurred: Thu Dec 29 10:01:55 2016

The sections below provide code to reproduce the included results and plots.


Methods Summary


Setup

Variables

Working directories, files and other variables necessary to the analysis.

Libraries

Bioconductor and R libraries used to process and visualize the data.

Functions


Import Data and Metadata

Data

  • load in phenotypes and array names from metadata file (covars.desc) in “metadata” directory
  • this file contains the names and descriptions of CEL files contained in the data directory
  • use array names to load in arrays

Sample metadata

treatment pulldown replicate source sampleID group run
wt1_whole-1 pulldown Wt1 1 whole_RNA wt1_whole-1 wt1_whole 1
input_whole-1 input input 1 whole_RNA input_whole-1 input_whole 1
input_whole-2 input input 2 whole_RNA input_whole-2 input_whole 1
input_whole-3 input input 3 whole_RNA input_whole-3 input_whole 1
stau2_whole-1 pulldown stau2 1 whole_RNA stau2_whole-1 stau2_whole 1
stau2_whole-2 pulldown stau2 2 whole_RNA stau2_whole-2 stau2_whole 1
stau2_whole-3 pulldown stau2 3 whole_RNA stau2_whole-3 stau2_whole 1
input_mrna-1 input input 1 mRNA input_mrna-1 input-mrna 2
stau2-whole-3 pulldown stau2 3 whole_RNA stau2-whole-3 stau2-whole 2

PreProcessing

Raw Data

Quality Control

Raw Data QC Report

The arrays look fine, no problems at all.

RMA Normalized Data

  • background correct and normalize data with RMA (Bolstad et al. 2003)

  • summarize probesets on the gene (‘core’) level

Quality Control

  • using arrayQualityMetrics library

Normalized Data QC Report

The arrays look good, and the clustering looks very good.

Unsupervised Clustering of RMA Normalized Data

Hierarchical Clustering

The goal of these analyses are to naiively evaluate the variability within the raw data and determine whether this variability can predict the different sample groups

The first method produces a dendrogram by performing
> a hierarchical cluster analysis using a set of dissimilarities for the n objects being clustered

Here, I’ve fist highlighted which input sample was mRNA, and then highlighted the different pulldown categories.

Principal Component Analysis (PCA)

This second approach is a dimension reduction and visualisation technique that is used to project the multivariate (i.e.multiple genes) data vector of each array into a lower-dimensional plot, such that the spatial arrangement of the points in the plot reflects the overall data (dis)similarity between the arrays. The data is typically reduced to a small number of dimensions (or components) which explain most of the sample variability. This Youtube slideshow gives a pretty good basic explanation of what PCA is doing.

Here, each point depicts the amount of variation explained by each component and the line shows the cumulative amount. For this data set, very few dimensions (3) can explain >75% of the variation observed in the samples.

As plots with more than 2 dimensions are difficult to visualize, we typically split up the dimensions/components and plot them pairwise against each other; the plots here show scatterplots of the arrays along all dual combinations of the first three principal components. In the first plot, each sample group is represented by a separate color and in the second plot each sample is represented by a different color.

You can use these plots to explore if the arrays cluster, find outliers, and determine whether this is according to an intended experimental factor or according to unintended causes such as batch effects. In these plots, I have once again first highlighted the RNA source (mRNA or whole RNA) and then highlighted the individual pulldown categories.

There is a high degree of clustering by pulldown type. So much so, that when you plot PC1 against PC2, both the input samples and stau2 samples largely overlap their respective sample groups. These results are consistent with a lower level of biological variation, likely resulting from the use of a single cell line for the experiment, making these replicates closer to technical replicates. The single input sample outlier is the mRNA sample.

These unsupervised clustering resutls reveal that the mRNA input sample has clear differences from the whole RNA input samples, more than can be attributed to batch effect, given how closely the Stau2 pulldown whole RNA repeat sample from the same run clusters with the Stau2 whole RNA samples from the first run.


Batch Correction

The whole RNA and mRNA input RNA samples were run on different days and may show batch effects. As an identical sample was also run both days, we can try adjusting for batch using ComBat r citep(“doi: 10.1093/biostatistics/kxj037”) from the sva package and see if it improves the data clustering.

## Found 2 batches
## Adjusting for 0 covariate(s) or covariate level(s)
## Standardizing Data across genes
## Fitting L/S model and finding priors

## Finding parametric adjustments
## Adjusting the Data

Based on the low variation within the Stau2 group before batch correction (look back to the first PCA plot) there does not appear to be much need for batch correction. In fact, the PCA plot after batch correction shows an undesirable loss of signal (and averaging betweeen samples), potentially due to the lack of inclusion of a repeated input sample. Given this, I decided to skip batch correction for this analysis.

Continuing forward, I removed the repeated Stau2 whole RNA sample.


Annotate

So far we have only been working with the probesets,without reference to the genes they assay. Here we load in metadata about the probesets on the array (feature data), the gene symbols in particular.

Filter Probesets

Reducing the number of genes assayed reduces the multiple test correction and may allow us to identify more differentially expressed genes.

Starting with 35556 probes remaining we can filter:

By Annotation

  • remove the control probes and probes without annotated genes

22701 probes remaining

By Cross Hybridization

  • some probes are annotated as potentially hybridizing to multiple targets

21894 probes remaining

By Low Expression Level

  • remove probes with low expression levels (bottom 10% of all expression levels) in all samples

20184 probes remaining

By Low Variability

  • remove probes with lower variation among all samples (without regard for group status) (dropped the bottom 10%)

18165 probes remaining


Statistical Analyses

Limma

A linear model for microarray data analysis (Limma) was performed on the samples to identify differentially expressed genes for comparisons of the sample groups. Limma fits a linear model to the expression data for all samples for each gene and is designed to handle complex experiments involving comparisons between many RNA targets simultaneously.

To perform limma, we construct two matrices. The design matrix provides a representation of the different sample groups which have been analysed. The contrast matrix allows the coefficients defined by the design matrix to be combined into contrasts of interest.

Design

  • make a matrix with arrays as rows, sample groups as columns
  • a one or a zero indicate respectively, that a sample either belongs or does not belong to the sample group

    inp ut_whole inp ut_mrna sta u2_whole wt1 _whole
    wt1_whole-1 0 0 0 1
    input_whole-1 1 0 0 0
    input_whole-2 1 0 0 0
    input_whole-3 1 0 0 0
    stau2_whole-1 0 0 1 0
    stau2_whole-2 0 0 1 0
    stau2_whole-3 0 0 1 0
    input_mrna-1 0 1 0 0

Contrasts

  • to perform specified pairwise comparisons
  • in this table, columns are contrasts/comparisons and rows are sample groups
  • a zero denotes that the sample group is not involved in the contrast, a 1 denotes that it has higher expression in the contrast and a -1 denotes lower expression in the contrast

I setup four contrasts, two to select genes that show a significant expression change between the input (both mRNA and whole RNA) and pulldown Stau2 samples and two to select genes that show a significant expression change between the input (both mRNA and whole RNA) and pulldown WT1 samples.

stau2_whole stau2_mRNA wt1_whole wt1_mRNA
input_whole -1 0 -1 0
input_mrna 0 -1 0 -1
stau2_whole 1 1 0 0
wt1_whole 0 0 1 1

These matrices are used to fit a linear model to the data. The linear model is applied and pairwise comparisons are performed to identify differentially expressed genes.

  • first fit the linear model based on the design matrix for each gene based on the given series of arrays
  • using the contrast matrix, compute estimated coefficients and standard errors for contrasts
  • compute moderated t-statistics and log-odds of differential expression by empirical Bayes shrinkage of the standard errors towards a common value

Linear model

  • for each gene based on the given series of arrays

Compute estimated coefficients and standard errors for contrasts

Bayes shrinkage

Compute moderated t-statistics and log-odds of differential expression

  • by empirical Bayes shrinkage of the standard errors towards a common value

Results

Statistics

  • as calculated by Limma
## [[1]]
## NULL
## 
## [[2]]
## NULL
## 
## [[3]]
## NULL
## 
## [[4]]
## NULL

Statistics and expression levels of all genes for these comparisons

Note that for all these files, I have not summarized values for genes assayed by multiple probes (i.e. by taking the median value), so you may see multiple instances of the same gene in the results

Stau2 whole RNA pulldown stats - all genes

WT1 whole RNA pulldown stats - all genes

These summary tables contain the following information:

  • logFC is the log2-fold change
  • the AveExpr is the average expression value accross all arrays
  • the moderated t-statistic (t) is the logFC to its standard error, the P.Value is the associated p-value
  • the adj.P.Value is the p-value adjusted for multiple testing (by FDR)
  • the B-value (B) is the log-odds that a gene is differentially expressed (the-higher-the-better)
  • the last 8 columns contain the log-transformed normalized expression levels for these genes in each sample

Identifying Genes Enriched by RBP pulldown

Volcano plots

Here we can visulize the relationship between the fold changes in expression observed for the different pulldowns. Our best candidate genes will not only have a statistically significant difference in gene expression between the two sample groups (as measured adjusted pvlaue) but also a large change (as measured by the log2 fold change). We are also only interested in genes that are enriched after pulldown, not those that are higher in the input samples.

Each of these plots contains 3 subplots:

  1. Bottom left - the volcano plot, a scatter plot with the observed log2fold changes (extremes are better) plotted against the -log10 adjusted pvalues (higher is better). For these contrasts, we are looking for genes that are enriched in the pulldown, genes that have at least an adjusted pvalue of 0.05 and a log 2 fold change more than 0.5849625 are highlighted with a green box.

  2. Upper left - a density plot (smoothed histogram) of the log2 fold changes observed for the contrast, the part of the distribution above 0.5849625 is highlighted under the curve in green.

  3. Lower right - a density plot (smoothed histogram) of the adjusted pvalued observed for the contrast, the part of the distribution above 0.05 is highlighted under the curve in green. Note that for this plot, this highlight also included genes enriched in the input samples.

Using these pvalue and log2 fold change cutoffs we can identify which genes are showing enrichment in the two pulldowns. The cutoffs I have picked here (pvalue<0.05 and log2foldchange>0.5849625) are within accepted range, if a bit stringent, but are arbitrary.

If you want to change these cutoffs to be more or less stringent, you can filter the Excel files above by adj.P.Val and logFC in Excel.

For these cutoffs:

  • the stau2_whole contrast, has 2085 enriched probesets probing 1818 genes.

Statistics and expression levels for just these differentially expressed genes

Note that, once again, for all these files I have not summarized values for genes assayed by multiple probes (i.e. by taking the median value), so you may see multiple instances of the same gene in the results

Stau2 whole RNA pulldown stats - top enriched genes

These summary tables contain the same information as the files above

Heatmaps of genes bound by Stau2

Top 50 for Stau2

Gene Ontologies

TOP 200

Running the top 200 genes (as sorted by logFC) through g:profiler reveals significant enrichment of genes involved in cytoskeletal protein binding.
File with GO results

Gene ontology enrichment analyses can yield an overwhelming number of enriched categories, many with redundant functionality. We can simplify this output by identifying the most representative subset of the terms, using metrics which measure the semantic similarity of the terms. Revigo (Supek et al. 2011) performs such analyses, using an algortithm which forms

groups of highly similar GO terms, where the choice of the groups’ representatives is guided by the p-values

The algorithm takes into account the parent-child structure of the gene onotology database

If the p-values are quite close and one term is a child node of the other, REVIGO will tend to choose the parent term

The algorithm also tries to find more specific GO terms.

Very general GO terms, however, are always avoided as cluster representatives … as they tend to be uninformative

Revigo allows visualization of these representatives and their relations to the terms within their group as a treemap. Here the color depicts a grouping of related terms, the size of a block, it’s pvalue from g:profiler and the large text the most representative gene ontology term for the related group.

More than 2 fold change

Running the genes with at least a two-fold expression change (logFC>=1) through g:profiler reveals significant enrichment of genes involved in cytoskeletal protein binding.
File with GO results

Specific GO terms

  • are any of the genes from the comparison involved in cell adhesion?
  • working from Gene Ontology term for cellular senescence, I pulled down all genes annotated with this term (and it’s “child” terms)
  • added specific GO terms as well

Excel file with Cell Adhesion Genes statistics

Kiebler/Kusek Functional analysis

Kiebler

Enriched GO terms

  • remove any genes with no symbol
  • rank by fold change
  • take top 200 genes

Excel file with Kiebler GO enrichments

Simplify GO terms

Specific GO terms

  • are any of the genes from the comparison involved in cell adhesion?
  • working from Gene Ontology term for cellular adhesion, I pulled down all genes annotated with this term (and it’s “child” terms)
  • added supplied GO terms as well

Excel file with Kiebler Cell Adhesion Genes annotations

Kusek

Simplify GO terms

  • no need to simplify as there is only one enriched term

Specific GO terms

  • are any of the genes from the comparison involved in cell adhesion?
  • working from Gene Ontology term for cellular adhesion, I pulled down all genes annotated with this term (and it’s “child” terms)
  • added supplied GO terms as well

Excel file with Kiebler Cell Adhesion Genes annotations


R Session Info

(useful if replicating these results)

## R version 3.3.1 (2016-06-21)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
## Running under: OS X 10.11.6 (El Capitan)
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
##  [1] grid      stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] org.Rn.eg.db_3.3.0                   treemap_2.4-1                        GOsummaries_2.6.0                    Rcpp_0.12.8                          gProfileR_0.6.1                     
##  [6] rio_0.4.16                           dplyr_0.5.0                          RRHO_1.12.0                          lattice_0.20-34                      magrittr_1.5                        
## [11] sva_3.20.0                           genefilter_1.54.2                    mgcv_1.8-16                          nlme_3.1-128                         biomaRt_2.28.0                      
## [16] GO.db_3.3.0                          venneuler_1.1-0                      rJava_0.9-8                          gridExtra_2.2.1                      RColorBrewer_1.1-2                  
## [21] ggdendro_0.1-20                      ggplot2_2.2.0                        CHBUtils_0.1                         devtools_1.12.0                      reshape2_1.4.2                      
## [26] plyr_1.8.4                           pheatmap_1.0.8                       limma_3.28.21                        arrayQualityMetrics_3.28.2           mogene10sttranscriptcluster.db_8.4.0
## [31] org.Mm.eg.db_3.3.0                   AnnotationDbi_1.34.4                 pd.mogene.1.0.st.v1_3.14.1           RSQLite_1.0.0                        DBI_0.5-1                           
## [36] oligo_1.36.1                         Biostrings_2.40.2                    XVector_0.12.1                       IRanges_2.6.1                        S4Vectors_0.10.3                    
## [41] Biobase_2.32.0                       oligoClasses_1.34.0                  BiocGenerics_0.18.0                  knitr_1.15                           knitcitations_1.0.7.1               
## 
## loaded via a namespace (and not attached):
##  [1] readxl_0.1.1               Hmisc_4.0-0                igraph_1.0.1               lazyeval_0.2.0             splines_3.3.1              GenomeInfoDb_1.8.7         gridBase_0.4-7            
##  [8] urltools_1.6.0             digest_0.6.10              SVGAnnotation_0.93-1       foreach_1.4.3              BiocInstaller_1.22.3       htmltools_0.3.5            memoise_1.0.0             
## [15] affyPLM_1.48.0             cluster_2.0.5              gcrma_2.44.0               openxlsx_3.0.0             readr_1.0.0                annotate_1.50.1            beadarray_2.22.2          
## [22] colorspace_1.3-1           haven_1.0.0                RCurl_1.95-4.8             jsonlite_1.1               survival_2.40-1            iterators_1.0.8            gtable_0.2.0              
## [29] zlibbioc_1.18.0            BeadDataPackR_1.24.2       scales_0.4.1               setRNG_2013.9-1            futile.options_1.0.0       vsn_3.40.0                 bibtex_0.4.0              
## [36] xtable_1.8-2               htmlTable_1.7              foreign_0.8-67             bit_1.1-12                 preprocessCore_1.34.0      Formula_1.2-1              httr_1.2.1                
## [43] acepack_1.4.1              ff_2.2-13                  XML_3.98-1.5               nnet_7.3-12                RJSONIO_1.3-0              labeling_0.3               munsell_0.4.3             
## [50] cellranger_1.1.0           tools_3.3.1                csvy_0.1.3                 evaluate_0.10              stringr_1.1.0              yaml_2.1.14                RefManageR_0.13.1         
## [57] mime_0.5                   xml2_1.0.0                 curl_2.2                   affyio_1.42.0              tibble_1.2                 stringi_1.1.2              highr_0.6                 
## [64] futile.logger_1.4.3        readODS_1.6.2              Matrix_1.2-7.1             triebeard_0.3.0            data.table_1.9.6           bitops_1.0-6               httpuv_1.3.3              
## [71] GenomicRanges_1.24.3       R6_2.2.0                   latticeExtra_0.6-28        affy_1.50.0                hwriter_1.3.2              gridSVG_1.5-0              affxparser_1.44.0         
## [78] codetools_0.2-15           lambda.r_1.1.9             MASS_7.3-45                assertthat_0.1             chron_2.3-47               SummarizedExperiment_1.2.3 openssl_0.9.5             
## [85] withr_1.0.2                VennDiagram_1.6.17         rpart_4.1-10               base64_2.0                 rmarkdown_1.1              illuminaio_0.14.0          Cairo_1.5-9               
## [92] git2r_0.15.0               shiny_0.14.2               lubridate_1.6.0

References

Bolstad, B.M., R.A Irizarry, M. Astrand, and T.P. Speed. 2003. “A Comparison of Normalization Methods for High Density Oligonucleotide Array Data Based on Variance and Bias.” Bioinformatics 19 (2). Oxford University Press (OUP): 185–93. doi:10.1093/bioinformatics/19.2.185.

Supek, Fran, Matko Bošnjak, Nives Škunca, and Tomislav Šmuc. 2011. “REVIGO Summarizes and Visualizes Long Lists of Gene Ontology Terms.” Edited by Cynthia Gibas. PLoS ONE 6 (7). Public Library of Science (PLoS): e21800. doi:10.1371/journal.pone.0021800.